<?php
namespace My\Model;

use Utuo\UtuoModel;

class DistributionShopScoreEventModel extends UtuoModel {
    
    protected $_auto = array(
        array('cfg', 'getConfig', self::MODEL_BOTH, 'callback'),
    );
    
    public $status = array(
        '1' => "启用",
        '0' => "禁用"
    );
    
    /**
     * 积分方式
     * @var unknown
     */
    public $scoreMethod = array(
        'TradeReward' => array(
            'name' => '购物返币',
            'fields' => array()
        ),
        'ScoreTrade' => array(
            'name' => '积币购物',
            'fields' => array()
        ),
        'FillInfo' => array(
            'name' => '完善资料返币',
            'fields' => array(
                'reward_score' => array(
                    'name' => '返积分',
                    'type' => 'text',
                ),
            )
        ),
        'DistributionReward' => array(
            'name' => '分销返币',
            'fields' => array()
        ),
        'FirstSubscribe' => array(
            'name' => '首次关注',
            'fields' => array(
                'reward_score' => array(
                    'name' => '返积分',
                    'type' => 'text',
                ),
            )
        ),
        'DownlineSubscribe' => array(
            'name' => '发展关注下线',
            'fields' => array(
                'reward_score' => array(
                    'name' => '返积分',
                    'type' => 'text',
                ),
            )
        ),
    );
    
    /**
     * 获得配置
     */
    public function getConfig() {
        $config = I("config", array());
        return serialize($config);
    }
}
